<?php
/**
 * 后台导航类
 * User: pengyx
 * Date: 2018/09/02
 * Time: 13:25
 */

namespace app\admin\docx;


class AdminNavs
{
    static private $navs = [
        "contentManagement" => [
            [
                "title" => "文章列表",
                "icon" => "icon-text",
                "href" => "/static/admin/page/news/newsList.html",
                "spread" => false
            ],
            [
                "title" => "图片管理",
                "icon" => "&#xe634;",
                "href" => "/static/admin/page/img/images.html",
                "spread" => false
            ],
            [
                "title" => "其他页面",
                "icon" => "&#xe630;",
                "href" => "",
                "spread" => false,
                "children" => [
                    [
                        "title" => "404页面",
                        "icon" => "&#xe61c;",
                        "href" => "/static/admin/page/404.html",
                        "spread" => false
                    ],
                    [
                        "title" => "登录",
                        "icon" => "&#xe609;",
                        "href" => "/static/admin/page/login/login.html",
                        "spread" => false,
                        "target" => "_blank"
                    ]
                ]
            ]
        ],
        "memberCenter" => [
            [
                "title" => "用户中心",
                "icon" => "&#xe612;",
                "href" => "/static/admin/page/user/userList.html",
                "spread" => false
            ],
            [
                "title" => "会员等级",
                "icon" => "icon-vip",
                "href" => "/static/admin/page/user/userGrade.html",
                "spread" => false
            ]
        ],
        "systemeSttings" => [
            [
                "title" => "系统基本参数",
                "icon" => "&#xe631;",
                "href" => "/static/admin/page/systemSetting/basicParameter.html",
                "spread" => false
            ],
            [
                "title" => "后台用户管理",
                "icon" => "&#xe770;",
                "href" => "Users/index",
                "spread" => false
            ],
            [
                "title" => "系统日志",
                "icon" => "icon-log",
                "href" => "/static/admin/page/systemSetting/logs.html",
                "spread" => false
            ],
            [
                "title" => "友情链接",
                "icon" => "&#xe64c;",
                "href" => "/static/admin/page/systemSetting/linkList.html",
                "spread" => false
            ],
            [
                "title" => "图标管理",
                "icon" => "&#xe857;",
                "href" => "/static/admin/page/systemSetting/icons.html",
                "spread" => false
            ]
        ],
        "seraphApi" => [
            [
                "title" => "三级联动模块",
                "icon" => "icon-mokuai",
                "href" => "/static/admin/page/doc/addressDoc.html",
                "spread" => false
            ], [
                "title" => "bodyTab模块",
                "icon" => "icon-mokuai",
                "href" => "/static/admin/page/doc/bodyTabDoc.html",
                "spread" => false
            ], [
                "title" => "三级菜单",
                "icon" => "icon-mokuai",
                "href" => "/static/admin/page/doc/navDoc.html",
                "spread" => false
            ]
        ]
    ];

    /**
     * 获取后台导航栏
     * @param bool $isReturnJson 是否返回json数组
     * @return array|string
     */
    static function getAdminNavs($isReturnJson = false)
    {
        $navs = self::$navs;
        $ret = $isReturnJson ? json_encode($navs) : $navs;
        return $ret;
    }

}